package com.xiaoxiao.springbootstudy.mapper;

import com.xiaoxiao.springbootstudy.pojo.Customer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoxiao.springbootstudy.pojo.vo.CountResult;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author XiaoXiao
* @description 针对表【t_customer】的数据库操作Mapper
* @createDate 2025-05-13 14:45:56
* @Entity com.xiaoxiao.springbootstudy.pojo.Customer
*/
public interface CustomerMapper extends BaseMapper<Customer> {

    @Select("""
             select address 'name',count(0) 'value' from t_customer group by address
            """)
    List<CountResult> countCustomerAreaMapper();
}




